package com.gzq.decorator.sgw;

public class Decorator extends Drink{
    private Drink obj;

    public Decorator(Drink obj) {
        this.obj = obj;
    }

    @Override
    public float cost() {
        float price = super.getPrice() + obj.getPrice();
        super.setPrice(price);
        return price;
    }

    @Override
    public String getDes() {
        return super.getDes() + super.getPrice() + ", " + obj.getDes() + obj.getPrice();
    }
}
